﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Bmz.Laboratory.Workflow.Enums;

namespace Bmz.Laboratory.Workflow.Entity
{
    public class InstanceAccess : BaseEntity
    {
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 可访问对象
        /// </summary>
        [MaxLength(50)]
        public string UserCode { get; set; }

        /// <summary>
        /// 访问状态 ：初始 读 提交
        /// </summary>
        public InstanceAccessStatusEnum Status { get; set; }

        [MaxLength(50)]
        public string TemplateAccessOject { get; set; }

        [ForeignKey("TemplateAccessOject")]
        public virtual TemplateAccess TemplateAccess { get; set; }

        [MaxLength(50)]
        public string InstanceNodeId { get; set; }

        [ForeignKey("InstanceNodeId")]
        public virtual InstanceNode InstanceNode { get; set; }
    }
}
